package com.nebula.service.impl;

import com.nebula.dao.impl.RoleNavigationDaoImpl;
import com.nebula.entity.RoleNavigation;
import com.nebula.dao.IRoleNavigationDao;
import com.nebula.service.IRoleNavigationService;

import java.util.List;

/**
 * @author CcccX
 * @since 2020-08-07 22:22
 */
public class RoleNavigationServiceImpl implements IRoleNavigationService {

    private IRoleNavigationDao roleNavigationDao = new RoleNavigationDaoImpl();

    @Override
    public int deleteByRoleId(int roleId) {
        return roleNavigationDao.deleteByRoleId(roleId);
    }

    @Override
    public int save(RoleNavigation roleNavigation) {
        return roleNavigationDao.save(roleNavigation);
    }

    @Override
    public int save(List<RoleNavigation> roleNavigations) {
        return roleNavigationDao.batchSave(roleNavigations);
    }

    @Override
    public int deleteByNavId(String navId) {
        return roleNavigationDao.deleteByNavId(navId);
    }
}
